扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:论坛整理 来源:ZDNet网络安全 2007年12月26日
关键字: telnet命令 opentelnet linux telnet telnet入侵 telnet telnet端口
The use of the Break Code from server to user TELNET has not previously been defined and, thus, could be used to solve the following problems which occur with line at a time and half duplex systems. Line at a time systems do not output characters to the terminal a character at a time but, instead, wait until a line is ready for output. If a CR-LF sequence (TELNET protocol for end of line) is received it is interpreted as an end of line and the characters received are output. If characters are received which do not end
[Page 2]
with CR-LF the user TELNET does not know whether or not other characters will follow which are part of the current line. Thus, the characters received thus far must be output, without a CR-LF (new line). If an end of message code were transmitted, the user TELNET would know whether or not other characters would be received for output. The user TELNET would then print characters either when the TELNET Break control is received or when the CR-LF newline sequence is received.
If the user TELNET is being run from a half duplex terminal, the terminal cannot receive input and type output at the same time. Thus, if output is received while the terminal is being used for input the TELNET program must either buffer the received characters or abort the input mode of operation to write out the received charac- ters. If characters received are written out as they are received, the terminal operation would be very similar to a full duplex terminal. This mode of operation requires that the terminal have a reverse break capability to allow the input mode to be aborted by program control.
In some systems it is only desirable to abort the input mode of operation when a complete line is ready for output. If a string of characters received does not end with an end of line code, the characters received will not be output until after the input line is entered, i. e., the mode of operation changed from input to output.
If an end of message code were transmitted, the user TELNET could abort the input mode of operation even though the end of line code was not received.
In systems which do not support the reverse break feature or if the terminal does not have this feature it is not possible to abort an input mode of operation in order to output received characters. In this case, the systems can operate in either of two modes, a) un-locked keyboard, or b) locked keyboard mode.
In an unlocked keyboard system, received characters are not output until the user completes an input line. An input line is completed when the end of line code is entered. This might be a CR, a LF, or a NL code. After received characters, if any, are output, the input modes is re-entered. To receive output the user must enter an input line (possibly a null line). If the user is waiting for output, he must repeatedly enter a line until the output has been received and typed.
Since an input line must be entered just to receive output, it is desirable to define an input line which does not result in anything being sent to the serving system. If a null line (a line consisting of just the end of line code) is chosen for this purpose, some other input line must be defined to cause a null line to be transmitted.
In a locked keyboard system, the input mode is not immediately
[Page 3]
re-entered after an input line is entered. It is re-entered only after a defined prompt is received. The prompt can be defined to be the reception of any character or can be defined to be a specific charac-ter code. If a specific code is chosen the serving site must send this code whenever the terminal should be put into input mode. If an end of message code were transmitted this code could be inter- preted to be the input prompt code.
In summary, three situations have been described where an end of message code would be desirable.
a) To indicate when a line which does not end with CR-LF should be output for line at a time systems
b) To indicate that the input mode in half duplex operation should be aborted so that received characters can be output
c) As a prompt character to cause the input mode to be entered for locked keyboard half duplex systems
The ASCII TELNET control code for Break (Reverse Break) could be interpreted as an end of message code when sent from server to user.
[ This RFCwas put into machine readable form for entry ]
[ into the online RFCarchives by BBN Corp. under the ]
[ direction of Alex McKenzie. 1/97 ]
婵犵鈧啿鈧綊鎮樻径鎰畺闁靛ň鏅滄慨婊堟偨椤栨稓鎽冮柟鐑╂櫊瀹曟岸宕堕埡鍌滄殸闂佽鍨伴崢鏍姳閿涘嫭鍠嗘い銈呭姬婵☆偅婢樺Λ妤呮偂濞嗘挸瀚夐柍褜鍓熷顒侊紣娓氣偓閻涙捇鏌涘┑鍛樂缂佹鐭傞獮搴ㄥ焵椤掑嫬瀚夋い鏍ㄧ懁缁诲棝鏌熼褍鐏茬紒杈ㄧ箞閺屽洭鏁愰崟顓犳澖闁荤姳闄嶉崹钘壩i崟顖涘殜闁硅泛顫曢埀顒€锕︾槐鏃堝箣閻愬弬妤呮煛閸偄鐏﹂柛瀣墬缁傛帞鎹勯搹瑙勵啈闂佸搫瀚烽崹閬嶅磻瀹ュ鍎嶉柛鏇ㄥ墯娴犳ê霉閿濆棗鈻曢柍褜鍓氶弻銊ф閻愬鈻曢悗锝傛櫇椤忛亶鏌曢崱顓熷